package com.example.demo;

import java.util.Random;

public enum LABEL {


		/**
		 * 没按照规范来  枚举名称是数据库字段
		 */
		age_feature("年龄特征", "age", "老年,青年,青少年,中年,未成年,中老年".split(","), 2),
		educ_bg("学历特征", "education", "专家,硕士,博士,本科,专科,高中,初中,小学,文盲".split(","), 2),
		physical("身体状况", "physical", "健康,亚健康,较差,严重".split(","), 2),
		nationality("国籍", "nationality", "中国,外籍".split(","), 2),
		belief("信仰", "belief", "基督教,天主教,佛教,伊斯兰教,印度教".split(","), 2),
		sex("性别", "sex", "男,女,未知".split(","), 2),
		constellation("星座", "constellation", "水瓶座,双鱼座,白羊座,金牛座,双子座,巨蟹座,狮子座,处女座,天枰座,天蝎座,射手座,摩羯座".split(","), 2),
		work_type("工作类别", "worktype", "企业,政府,其他".split(","), 12),
		company_info("公司性质", "company", "国家行政企业,其他".split(","), 12),
		profession("职业", "profession","教师, 工人, 记者, 演员,厨师,医生, 护士, 司机, 军人,律师,商人, 会计, 店员, 出纳,作家,裁缝, 翻译, 法官, 保安,花匠,服务员,清洁工,建筑师,理发师,采购员,设计师,消防员,机修工,推销员,魔术师,模特儿,邮递员,售货员,救生员,运动员,工程师,飞行员,管理员,机械师,经纪人,审计员,漫画家,园艺师,科学家,主持人".split(","), 12),
		rpr_type("户口类型", "registered", "农村户口,城乡户口,其他户口".split(","), 12),
		soldier_info("军属", "soldier", "军属,非军属".split(","), 12),
		car_info("车辆", "car",  "有车,没车,有多车".split(","), 11),
		consume_level("消费水平", "consumption", "消费水平高,消费水平中,消费水平低".split(","), 11),
		family_level("家庭收入水平", "family", "家庭收入水平高,家庭收入水平中,家庭收入水平低".split(","), 11),
		house_info("房产情况", "house", "有房,没房,有多房".split(","), 11),
		income_level("收入水平", "income", "收入水平高,收入水平中,收入水平低".split(","), 11),
		evection_info("出差情况", "evection", "从不,经常,偶尔".split(","), 6),
		city_info("生活城市情况", "city", "三级城市,二级城市,一级城市".split(","), 6),
		children_info("子女情况", "children", "无孩,有一个孩,有二个孩,有多个孩".split(","), 6),
		territory_info("生活城市区域情况", "cityarea", "市中心,郊区".split(","), 6),
		marriage_info("婚姻情况", "marriage", "已婚,单身,再婚".split(","), 6),
		age_val("用户业务年限", "customer_service", "老用户,新用户,普通用户".split(","), 1),
		risk_level("风险评级", "risk_rating", "风险评级极低,风险评级低,风险评级中,风险评级高,风险评级极高 ".split(","), 1),
		property_level("忠诚度", "loyalty_level", "忠诚度高,忠诚度中,忠诚度低 ".split(","), 4),
		contribute_level("资产等级", "property_level", "黄金用户,砖石用户,白金用户,普通用户 ".split(","), 4),
		loyalty_level("贡献度", "contribute_level", "贡献度高,贡献度中,贡献度低 ".split(","), 4),
		life_cycle("生命周期", "life_cycle", "考察期,形成期,成熟期,退化期,衰亡期 ".split(","), 4),
		credit_level("信用评分", "credit", "优秀、良好、普通、较差、黑名单".split("、"), 5),
		overdue_rate("逾期概率", "overdue_rate", "逾期概率极高、逾期概率高、逾期概率中、逾期概率低、逾期概率极低".split("、"), 5),
		demand_manage("理财需求预测", "need_mmm", "中等、较弱、较强、极强、很弱".split("、"), 8),
		demand_loans("贷款需求预测", "need_loans", "中等、较弱、较强、极强、很弱".split("、"), 8),
		demand_aging("分期需求预测", "need_stages", "中等、较弱、较强、极强、很弱".split("、"), 8),
		property_forecast("资产价值预测", "property_stages", "短期保持".split("、"), 11),
		integral_level("积分等级", "integral_level", "积分达人".split("、"), 9);

	
	private static String strlabelen = "client_account_properties,client_natural_properties,client_lifetime_value"
			+ ",client_level,client_credence_property,client_geographical_attribute,client_lose_attribute,"
			+ "latent_need_forecast,online_behavior_characteristics,client_preference,"
			+ "client_estate_properties,client_society_properties,client_transaction_properties";
	private LABEL(String name, String key, String[] labelInfos, int pcode) {
		this.pcode = pcode;
		this.name = name;
		this.key = key;
		this.labelInfos = labelInfos;
	}

	/**
	 * 
	* @Description: 返回随机code值
	*
	 */
	public static String getRandomCode(LABEL label) {
		int i = new Random().nextInt(label.getLabelInfos().length)+1;
		String str1 = strlabelen.split(",")[label.getPcode()];
		String str2 = label.key;
		return str1+"_"+str2+"_"+i;
	}
	
	/**
	 * 父标签id
	 */
	private int pcode;
	
	/**
	 * 标签类名
	 */
	private String name;
	
	/**
	 * 标签key值
	 */
	private String key;
	
	/**
	 * 标签类型
	 */
	private String[] labelInfos;

	public int getPcode() {
		return pcode;
	}

	public void setPcode(int pcode) {
		this.pcode = pcode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String[] getLabelInfos() {
		return labelInfos;
	}

	public void setLabelInfos(String[] labelInfos) {
		this.labelInfos = labelInfos;
	}
	
	

}
